Spa control system

ABSTRACT

An improved spa control system is disclosed. The invention describes a spa control system which calculates the time required to heat the water in the spa system to a desired temperature. From that information, the heating rate of the spa system can be determined, and the heating element of the spa system can be activated at the proper time to raise the temperature of the water to a selected temperature by a desired time. The spa system also monitors information which might show errors in the operation of the spa system such as a blockage in the flow of water over the heating element in the spa system.

[0001] This application is a continuation of U.S. patent application Ser. No. 08/327,927 filed Oct. 24, 1994, which was a continuation of U.S. patent application Ser. No. 08/225,282 filed Jan. 11, 1994, which was a continuation of U.S. patent application Ser. No. 07/224,869 filed Jul. 26, 1988, which was a continuation-in-part of U.S. patent application Ser. No. 054,581, filed May 27, 1987, now U.S. Pat. No. 5,550,753, each of the above related applications and patent being incorporated herein by reference.

FIELD OF THE INVENTION

[0002] This invention relates to the development of a spa control system. More particularly, this invention relates to a spa control system which uses an interconnection panel and a control panel to effectively control various operating functions of the spa.

BACKGROUND OF THE INVENTION

[0003] The design of systems to control spas is complicated by the environment of the spa. Typically, spa control systems contain heating elements, controls, switches, and wiring harnesses which deteriorate when exposed to moisture or extreme levels of humidity and a hostile chemical environment. Since the chemically treated, heated water of the spa raises the humidity level and produces corrosive gases, the atmosphere surrounding the controls of the spa unit is inherently corrosive to spa control systems.

[0004] The accuracy of the temperature of the spa water is essential to the safety and comfort of the spa user. This temperature is difficult to accurately control, since the temperature of the water can vary rapidly depending on the number of spa users, the ambient temperature of the air, and other environmental factors. To conserve energy, the spa temperature is customarily raised to the desired level shortly before the expected use of the spa, and is not maintained at a constant temperature when the spa is unattended. Depending on the use of the spa, the temperature of the spa water may be cycled several times per day. During these cycles, the control of the water temperature is difficult to maintain without overheating or underheating the water. Typically, a spa control system merely heats the water with a heating element until the temperature of the water matches a predetermined setting selected by the spa user. Since the heating element is not turned off until that desired water temperature is reached, the residual heat in the heating element may increase the temperature of the water beyond the actual temperature desired. Conversely, the location of the temperature sensor may be located in the spa in such a fashion that it does not sense the actual, median water temperature. Accordingly, the heating element may be turned off before the temperature of the water reaches the desired level.

[0005] Present spa controllers operate on line voltages which can present a safety hazard to the spa users. To meet desired safety specifications, these controls are typically located away from the spa, however, this separation is inconvenient to the spa user.

[0006] The present invention overcomes the foregoing difficulties by providing a spa control system which accurately and efficiently controls the operation of the spa and is not adversely affected by the corrosive environment surrounding the spa. The spa temperature control system generally comprises a heating element, a sensor for detecting the temperature of the water, and a microcomputer for processing signals generated by said sensor and for activating and deactivating the heating element. In one embodiment of the invention, the microcomputer assesses the time necessary to heat water from an initial temperature to a selected temperature. From this information, the heating rate of the water can be calculated. The heating rate can be stored by the microcomputer and can be used to determine the star time necessary to heat the spa water from an initial temperature to a selected temperature by a desired time. In the same or another embodiment of the invention, the temperature difference between two sensors in the spa system can be monitored to detect problems in the system.

BRIEF DESCRIPTION OF THE DRAWINGS

[0007]FIG. 1 illustrates a schematic block drawing of the spa control system.

[0008]FIG. 2 illustrates a block diagram of the microcomputer and its associated components.

[0009]FIG. 3 illustrates a block diagram of the spa control system field innerconnection panel.

[0010]FIG. 4 illustrates a functional block diagram of the software which operates the spa control system through the microcomputer.

[0011]FIG. 5 illustrates one embodiment of a display panel for the operation of the spa control system.

[0012]FIG. 6 illustrates the overall software control of the spa control system.

[0013] FIGS. 7-13 illustrate flowcharts of various software unctions of the spa control system.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0014]FIGS. 1 and 2 illustrate a block diagram of the overall spa control system. The spa control system uses an intelligent microcomputer 10 to monitor and control the operation of the spa (not shown). The system uses solid state electronic components which eliminate many of the problems associated with traditional mechanical timer and relay control systems. The use of solid state electronic components increases the reliability of the system and reduces the maintenance necessary to maintain the spa in operable condition.

[0015] Referring to FIG. 1, the external system generally comprises a spa control panel 12 which is connected to a system innerconnection panel 14. The system innerconnection panel 14 is also connected to power input 16, to various sensors which detect parameters at such a flow rate 18, temperature 20, and pH of the water 22, and also the mechanical and electrical components of the spa, such as the pump 24, heater 26, blower 28, and lights 30. The heater 26 may be interlocked to the pump 24 so that the pump 24 is continuously pumping water over the heating element (not shown) of the heater 26 while the heater 26 is activated. This prevents a “hot spot” from developing in the spa system which could damage the components of the spa or give erroneous measurements.

[0016] The system is a microcomputer-based system. In addition to the microcomputer 10, the system utilizes several other devices. While the control program runs on the microcomputer 10, it is directly responsible for the management of the system hardware. The following description briefly summarizes the major devices:

[0017] NOVRAM 32

[0018] This is a nonvolatile RAN device that is used to store the system calibration values as well as providing RAN expansion for the microcomputer 10. An ROM image of the current image is stored when the powerfail interrupt is posted to the microcomputer 10 and restored when the microcomputer 10 powers up.

[0019] RTC 34

[0020] This is a realtime clock device that provides a clock value. It is the timebase for events that are scheduled by time of day as well as a time for events that are measured in seconds.

[0021] A/D 36

[0022] This is an analog to digital converter that converts voltage inputs after signal conditioning 37 to digital numeric representations. It provides three values: spa temperature, heater temperature (both labelled 20) and value 22.

[0023] DISPLAY DRIVER or INTERFACE 38

[0024] This device accepts a bitstream 39 from the microcomputer and drives the display 40 for the spa control panel 12. A bit is input for each segment on the display.

[0025]FIG. 2 illustrates a block diagram of the spa control system and its associated components. The electronics in the spa control system are designed to handle temperature extremes of minus twenty to plus seventy degrees Centigrade. The technology used in this design of interface components is Complementary Metal Oxide Semiconductors (CMOS) which is low in power consumption and high in reliability. The microcomputer 10 is typically an 8-bit control device with an 8-bit data bus 42. Its function is to execute instructions, control processes, make logical decisions and compute values. The microcomputer 10 operates at a clock speed of typically two megahertz and can make thousands of calculations per second. The microcomputer 10 reads instructions from the memory, such as EPROM 44 and then executes the appropriate actions.

[0026] The Eraseable Programmable Read Only Memory (EPROM) 44 scores the instructions for the microcomputer 10 to execute. Once a program is created the final software is loaded into the EPROM 44. The EPROM 44 can be modified to add new features, or additional EPROMs (not shown) can be connected to manage different functions and applications. The Random Access Memory (RAM) 32 is a memory device which stores temporary information while the information is being processed by the microcomputer 10. The RAM 32 only reads and writes data, and can hold data for future reference even after the main power 16 is turned off. The RAM 32 stores data such as the number of hours on the heater 26, the number of times that the temperature of the spa exceeds the pre-selected temperature, and other information.

[0027] The Real Time Clock (RTC) 34 shows the proper time of day which is calculated after the time and date are initially set. The microcomputer uses this information to schedule events concerning the operation of the spa, such as when the spa is turned on, when the water is circulated, and other events. The RTC 34 is backed with a battery or similar device (not shown) so that it maintains the accurate time when the main power supply is turned off.

[0028] The display interface 38 is responsible for driving and updating the display device 40. When the microcomputer 10 sends information to this block it is decoded and displayed on the screen 46.

[0029] The display screen 46 is typically a vacuum-fluorescent type which has a blue-green color. The display contains four seven-segment characters, and colon. The Display Interface 38 represents circuitry which drives and updates the display device. Information from the microcomputer 10 is decoded and displayed on the screen 46 by the means of the interface 38. The data remains on the screen 46 until the microcomputer 10 sends a new message or the system is reset or powered off.

[0030] The keyboard 48 (FIGS. 1 and 6) shown is a flat panel membrane style which is incorporated into the front panel. One type of keyboard 48 has ten push-buttons 50 and nine translucent cutouts for backlighting of Light Emitting Diodes (LEDS) 52. The keyboard 50 is mounted on bezel 54 to provide a firm surface when depressing the buttons 50. The keyboard interface 56 provides circuitry which transmits information from the keyboard 48 to the microcomputer 10. The keyboard interface 56 acts as an array of on/off switches that correspond to each keypad. The microcomputer 10 scans these switches as on/off, switch type input bits.

[0031] The Digital Outputs 58 drive the external spa devices, such as the blower 24, heater 26, pump 28 and other auxiliary devices. The low voltage signals are optically isolated 60 and then drive a TRIAC device 62 which provides the high voltage and high current required by the external devices.

[0032] As previously set forth, the system innerconnection panel 14 connects the components of the spa control system. Referring to FIG. 3, the power 16 to the system innerconnection panel 14 is supplied through usual power supply. The Ground Fault Current Interrupter (GFCI) 64 provides protection to the system inner connection panel 14 if an imbalance of current flow occurs through the Door Interlock between the Input and the Output of the GFCI. The GFCI 64 prevents voltage and current from entering the system after the device has been triggered. After the power has passed through the GFCI 64, the Power Supply 66 converts the 110 or 220 Volt AC into the low voltage and low power required by some components of the system. The power supply 66 also contains the backup battery or other device (not separately shown) used to provide power to the RTC 34 when the main power is turned off.

[0033] The Opto-Isolators 60 receive signals from the spa control panel 12 which designate the operation of the proper output device. The Opto-Isolators 60 isolate the low voltage and current control system from the high voltage and high current of the main power supply 16. These devices in conjunction with Triacs 62 also provide synchronization with the zero volts crossing of the AC power 16 to switch devices on/off when power is minimal to avoid stressing devices. Connected to the Opto-Isolators 60 are the Triacs 62, which are solid state devices used to drive high voltage and high current output devices with alternating current. Triacs 62 function as relays, except that Triacs 62 are electronic devices that do not contain any moving parts. Typically, the Triac 62 to a heating element may be rated at forty amps maximum current, and the Triacs 62 to other output devices might typically be rated at twenty-five amps. Connected to the Triacs 62 is a field connection board 70 which mechanically permits the connection and disconnection of field devices such as a pump motor 24, blower motor 28, heater core 26, or a spa light 72.

[0034] The output devices are connected to the field connection board 70 by connectors 71.

[0035] The Analog Input section 36 converts information from various sensors 20, 22 into digital information so that the data can be read by the microcomputer 10. The converter 36 translates the analog information into digital information through, for example, dual slope integration which permits fast and accurate conversion. The accuracy of the AD section 36 typically is 8 bits or a resolution of 1 out of 256. The signals from external probes and sensors 20, 22 are conditioned by amplifying, filtering, or conditioning the signals 37 so that the A-D converter 36 can make an accurate conversion. The Signal Conditioning section 37 also receives the small signals from external probes 20, 22 and amplifies it to a level where the A-D converter 36 can mare an accurate conversion. This section 37 also provides transient and surge protection to reduce normal and common mode rejection noise.

[0036]FIG. 4 illustrates a functional block diagram of the software which operates the microcomputer 10. The final software code is encrypted on the EPROM 44 for operating the microcomputer 10. The main program 80 schedules the operation of all other subprograms and performs general housekeeping chores, such as memory management, timer control, interrupt handling and the scheduling of tasks.

[0037] The keyboard monitor routine 82 scans the keyboard and is triggered by the operation of any key. The key signal from he digital input is then decoded, and the main program 80 is triggered to initiate a series of programmed events. The program ignores multiple key depressions and erroneous entries and operates only upon the signal generated from a proper key entry. The display control program 84 converts data from the EPROM 44 to readable messages which can be shown on the display 46. The display control 84 handles the timing of the signals so that the display 46 performs in an efficient and proper manner. The alarm control 86 monitors the proper operation of the entire spa system. If the system malfunctions or otherwise operates incorrectly as measured by the input signals or data inferred from the input signals, the alarm will signal the malfunction to the panel 12. Examples of malfunctions in the system that might occur are the malfunction of the heater 26 and whether the pH 22 levels are within an acceptable range. In the event of a malfunction, a signal will be sent to the display controller 84 to display the alert signal and to alert the spa user of the malfunction.

[0038] The Analog Conversion Program 88 manipulates the converter circuitry 36 to read and convert analog input signals from sensors to digital information. This program also converts the digital information to engineering units for the purposes of display and comparison.

[0039] The RTC control program 90 controls all interaction with the Real Time Clock 34. The program is responsible for loading data for future events.

[0040] The PID Control 92 constructions stands for proportional, integral and derivative control. This program 92 performs the closed loop control of temperature using the temperature input as its variable to be controlled and the heating elements 26 and the output to maintain control. The program 92 monitors the temperature 20 of the water and determines when the heater 26 should be engaged. The program issues a command which activates the heater 26, and then monitors the temperature 20 to determine when the heater 26 should be turned off. The program is unique in that it also monitors the rate of decrease and the rate of increase of the water temperature so that the final temperature of the water is not higher or lower than the selected temperature beyond the control supplied by *derivative control. The spa control system can achieve an accuracy of plus or minus one degree Fahrenheit with the heating and monitoring elements.

[0041] The output, control program 94 issues commands to the output components to turn on the Triacs 62 for control of the pump 24, heater 26, blower 28, lights 30 and other components. The input scanning program 96 monitors devices such as push buttons and switches. The pH algorithm 98 converts raw digital data received from the AD converter 36 on the pH input 22 and converts this data to standard pH units of measure.

[0042]FIG. 5 provides an overview of the program organization. Three events are handled by the system. Reset occurs when the system is powered up. It performs system initialization, enables the other events, and then calls the main program. The timer interrupt occurs periodically and inputs that require periodic polling are scanned. The power fail interrupt occurs when system power is failing. The primary purpose of this handler is to save the current system operating parameters within the time remaining before power fails completely. The function of certain subroutines in one embodiment of the system are described in detail below.

[0043] The system initialization routine is invoked by powerup reset. This routine is responsible or initialization of all devices and data structures. The tasks it performs are:

[0044] Clear all RAM

[0045] Turn of all control outputs

[0046] Digital I/O initialization

[0047] Restore NOVRAM image (to restore previous system configuration)

[0048] Clear display

[0049] Initialize the RTC. It the time was lost, it is reset to 12:00 midnight

[0050] Initialize keyboard scanner

[0051] Test the NOVRAM image or validity. If the image is invalid, create fallback image and post warning

[0052] Test EPROM (program space) memory

[0053] Display 110/220 volt setting

[0054] Perform RTC update test (takes a couple seconds)

[0055] Enable timer and powerfail interrupts

[0056] Jump to main program

[0057] The time interrupt handler responds to the periodic timer interrupts. It scans I/O devices that require constant scanning for system operation and provides a higher frequency timer base than the one second resolution provided by the real time clock. The operations this handler executes are:

[0058] Save interrupted program's context

[0059] Update high speed clock value for synchronization with main program

[0060] Scan keyboard

[0061] Poll real time clock and if seconds have changed, provide one second timer update

[0062] Read in one analog channel. Provide raw input correction and calculate engineering units (temperature values are curve-fitted, and pH values are temperature corrected)

[0063] Restore interrupted program's context

[0064] Return to the interrupted program

[0065] The powerfail interrupt is furnished by a level-monitoring circuit which monitors power loss on system input power. When a decline is detected, an interrupt is posted to the microcomputer. The powerfail handler is invoked when this interrupt is posted. It is responsible for saving the current system configuration and for shutting the system down in an orderly fashion. The tasks it performs are:

[0066] Mask all interrupts

[0067] Save system configuration (this includes operating parameters as well as user settings)

[0068] Turn off all spa controls

[0069] Display “Fail”

[0070] Monitor powerfail interrupt for power restoration (brown out). If powerfail is cleared and remains cleared for approximately one second, the powerup reset handler is called.

[0071] The main program performs the bulk of the operations performed by the system controller. It synchronizes with the timer interrupt so that a reasonably constant time base is used. A state machine is maintained to determine how keyboard inputs are to be interpreted and what is to be displayed. The following tasks are performed by the main program:

[0072] On initial (powerup) entry, pause to allow timer interrupt handler time to build valid input values

[0073] Synchronize with timer interrupt. While waiting for timer, drive buzzer output.

[0074] Update the general timer used by state handlers for timeouts

[0075] Run flasher manager

[0076] Get current keyboard inputs

[0077] If any keyboard inputs are available, post buzzer output request and reset the “system unattended” timer

[0078] Handle keyboard inputs for maintenance mode entry/exit

[0079] Call control manager keyboard input handle

[0080] Call current state manager's keyboard handler routine

[0081] Handle remaining function keyboard inputs to drive state changes

[0082] Go to current state's display handler

[0083] Call control manager to drive system controls

[0084] Go back to the timer synchronization step (step 2)

[0085] Operator settings can be controlled by keys on the system keypad which are used to select modes that allow the operator to change settings that control system operations. These are grouped at the right side of the keypad. They are:

[0086] Spa temperature

[0087] Spa ready

[0088] Filter maintenance

[0089] Time of day

[0090] Scheduled heating

[0091] All of these functions adhere to a consistent operator interface scheme. When the unction key is pressed, the LED next to the key is lit. The LED remains lit until all steps have been completed or another function has been selected. While setting a value, the value is displayed on the screen and is flashed. The arrow keys are used to change the displayed value and the function key is pressed to proceed to the next step in the setting. While changes are being made, the display stops flashing to avoid changes occurring while the display is in the off state. Once changes have stopped, the display resumes flashing. Changes are honored as they are made and the operator can change one step of a function without affecting the remaining steps. The current setting can be reviewed by pressing the appropriate function key repeatably. When a function that has been defined by the operator is currently being executed, the LED next to the corresponding button blinks.

[0092] The spa temperature key is used to define the temperature setpoint. This function has only one step that allows the setpoint to be changed. Pressing the set temperature key again exits the mode.

[0093] The spa ready key is used to define when the spa is to be at a particular temperature. The following example would cause the system to bring the spa temperature to 102 degrees at 6:30 p.m. Example * Set the hour of the ready time 06: P * Set the minute of the ready time 06:30 * Set the temperature to be achieved 102 * Enable/disable this function On

[0094] The filter maintenance key is used to define an interval during which the low speed pump is to be run to filter the spa water. It has the following steps:

[0095] Set the hour of the start time

[0096] Set the minute of the start time

[0097] Set the duration of the interval. This value changes in increments of ten minutes and can be set from zero to eight hours.

[0098] The time of day is set in two steps. First the hour is set, then the minute. Hours are displayed with an “A” or “P” for am and pm indication.

[0099] This scheduled heating function allows the user to define the hysteresis that is to be used when the spa is unattended. It also allows a “start time” to be defined. The spa will begin heating whenever the temperature drops below the low temperature setting or the time matches the start time. With an appropriate temperature envelope, this will allow the spa to heat once a day while unattended. The following steps are used to define this function:

[0100] Set the hour of the start time

[0101] Set the minute of the start time

[0102] Set the high limit of the temperature envelope

[0103] Set the low limit of the temperature envelope

[0104] Enable/disable this function

[0105] The idle mode is used when none of the operator setting functions are active. At this time, the display scrolls through a sequence of displays that display the systems current state. The time, temperature, pH and error indications may be cycled continuously.

[0106] Concerning operator controls, some of the systems control outputs are directly controlled by the operator through alternate action inputs on the keypad. These are the light, jet and turbo keys. The control, manager's keyboard handler accepts these keyboard inputs and changes the current output values. These changes are then reflected on the LEDs next to the keys. The LEDs are lit when the corresponding control is on.

[0107] Maintenance mode is a special state that is reached by turning the maintenance switch to its “on” position. When the maintenance mode is active, all controls are turned off and the functions of the keys are redefined. When none of the keys are active, “test” is displayed. When each key is pressed, its corresponding LED is lit and a value is displayed. The arrow keys alternately light all LEDs and display segments and the turn all LEDs an segments off. The following is a map of the keys and the values displayed in maintenance mode: SCHEDULED HEAT pH input SPA READY spa temperature input FILTER heater temperature input TIME overtemp time accumulator TEMPERTURE heater run accumulator JET pump run accumulator TURBO turbo run accumulator

[0108] Accumulated time values are displayed in thousands of hours. A decimal point is placed to autorange the displayed value.

[0109] System calibrations are accessed by pressing the light key while in maintenance mode. When the light key is pressed, a series of options are displayed. To select a step, or continue it, an arrow key is pressed. To get the next selection or return to the “test” display, the light key is pressed. The options available are:

[0110] CAL0 Calibrate analog channel 0 (spa temperature). This is a two point (32 and 104 degree) calibration for offset and gain correction.

[0111] CAL1 Calibrate analog channel 1 (heater temperature). This is identical to CAL0.

[0112] CAL2 Calibrate analog channel 2 (pH input. This is a one point (0 volts) calibration for offset correction.

[0113] CPU Display cpu RAM contents.

[0114] nov Display NOVRAM contents.

[0115] rvx.y The software revision is “x.y”

[0116] The following describes the modules that make up the system controller and further describes the algorithms they contain:

[0117] The module anlgin-routine anlgin routine controls the input of a specified analog input channel. The operations it performs are:

[0118] output channel number

[0119] read input value

[0120] The module BCDNEG routine is called to negate a BCD value.

[0121] The module BINBCD routine is called to convert a binary value to a BCD value.

[0122] The buzzkey routine is called to determine if the key closure should result in the buzzer beeping. “Positive” key values result in the buzzer flag being set for “buzzer”.

[0123] The buzzer routine is called to drive the buzzer if a key was pressed. The buzzer interval is decremented until it is zero and the buzzer stops.

[0124] The buzzoff routine is called to cancel the keyboard buzzer output in special cases when the state handler wishes to block certain keys from being acknowledged.

[0125] The KBCAL0 routine is called to handle keyboard inputs while displaying “CAL0”. It allows the user to move on to CAL1 or to select to calibrate analog channel 0.

[0126] The KBCAL1 routine is called to handle keyboard inputs while displaying “CAL1”. It allows the user to move on to CAL2 or to select to calibrate analog channel 1.

[0127] The DSPCAL0, DSPCAL1, DSPCPH routines display the “CALn.” message.

[0128] The KBCLOW routine handles keyboard inputs while scanning the low (32 degree) value during calibration or channels 0 and 1. The user can select to abort or continue. If the choice is to continue and the raw input value is in the range 1 . . . 31, then the value is accepted and calibration continues to the high step. Otherwise, the low error state is entered.

[0129] The DSPCLOW routine is called to display the raw value while waiting or the low (32 degree) input value. It builds a display of the form “Ln:xx” where n is 0 or 1 and xx is the raw input value.

[0130] The KBCLERR routine is called when the calibration is in the low error state. It allows the user to choose to abort or retry the input of the calibration value.

[0131] The DSPCLERR routine is called to display the low calibration error message of the form “Lx:Er” where x is 0 or 1.

[0132] The KBCHI routine is called to handle keyboard inputs while the temperature calibration is in the high (104 degree) input state. It allows the user to abort or accept the current setting If the current setting is in the range 163 . . . 195, the value is accepted. In conjunction with the previously obtained low value, a pair of values, m and b, are calculated such that with raw value r, m*r+b will result in a corrected value at the two calibration points. These two values are stored in NOVRAM and used from this point onward in temperature calculations for this channel. The system then proceeds to the “done” state. If the input value is not in the correct range, the system proceeds to the high error state.

[0133] The DSPCHI routine is called to display the raw input while in the high (104 degree) calibration step. It builds a message of the form “Ln:xx” where n is 0 or 1 and xx is the raw value.

[0134] The KBCHERR routine is called when the calibration is in the high error state. It handles the keyboard input and allows the user to abort the sequence or return to the high value input state.

[0135] The DSPCHERR routine is called to display the message “Hn:Er” when the high calibration step is in error. “n” is either 0 or 1.

[0136] The KBCDONE routine is called to handle keyboard inputs when the calibration is complete. It allows the user to return to the idle maintenance mode state. It acts to hold the “done” message until the user acknowledges it.

[0137] The DSPCDONE routine is called when the calibration has reached a successful conclusion. It displays the message “done”.

[0138] GETRAW is a routine local to the calibration module to fetch the appropriate raw input from the raw input table.

[0139] The KBCPH routine is called when “CAL2” is displayed. It allows the user to choose to move to the next item in th “light” menu or to calibrate the pH input.

[0140] The KBCPHI routine is called to handle keyboard inputs when calibrating the pH input. It allows the use to abort the operation, or to accept the current input. If the current input has an error of less than 32, the offset is stored and the calibration goes to the “done” state. If the error is too large, the system goes into the pH error state.

[0141] The DSPCPI routine is called to display the current raw pH input during pH calibration. It forms a message of the form “PH:xx” where xx is the current raw input.

[0142] The KBCPHE routine is called to handle keyboard inputs when the pH calibration value has too large an error. It allows the user to abort the operation or to retry the calibration.

[0143] The DSPCPE routine is called to display the error message “Hn:Er” when the calibration value has too large of an error.

[0144] The module control-routine CTLPOLL routine is called by he main program to perform the actual output controls. The following casks are performed:

[0145] Set Ready—if the set ready function is enabled, this section decides if the set ready function is to perform any actions. If the current time marches the ready time, the set ready temperature is copied to the spa temperature setpoint, the spa is marked “attended” and the set ready function is disabled to prevent further actions.

[0146] For the Set Ready, as well as for Normal Temperature Control discussed infra, the time required to get from the current temperature to the desired temperature is calculated and with a fifteen minute hysteresis, the decision is made whether to turn the function on, or to turn it off. If the function is to be on, a request is posted to the heater to run.

[0147] System Attended—system attendance is checked and if the system is unattended, the high speed jet and the turbo controls are turned off. The system is marked attended if a key has been pressed within the last 30 minutes.

[0148] Scheduled Heating—if the scheduled heating function is enabled, this section decides if this feature should perform any actions. If the system is attended, control is passed to next section, normal setpoint control. If the function is off, the temperature is compared to the low setting and the time is compared to the time setting. If appropriate, the function is requested, but control is still passed to the “on” section to allow it to override the time startup. If the function is on, the temperature is compared to the high setting and turned off if the setting has been reached. The next section, normal setpoint control, is then skipped.

[0149] Normal Temperature Control—this function is executed if the system is attended or if the scheduled heating function is not enabled. It compares the current temperature to the temperature setpoint to see if the heater should be given a request to be on or off from this function.

[0150] Heater/Pump Interlocks—this section handles pump/heater interlocks. It requires that the pump runs fifteen seconds before the heater actually runs. It also guarantees that the pump runs sixty seconds after the heater is turned off. It also interposes at the delay lockout to prevent on/off cycling due to fluctuations in control requests.

[0151] 110V Interlocks—units operating on 110 v have limitations on how much power can be used at any given moment. The system charges 110/220 algorithm automatically at power-up. This section also checks the current 110 v/220 flag and posts a heater shutdown request if this is a 110 v unit and either the jet or turbo are on.

[0152] Pump Speed Interlock—this section handles the timing of transfers between high and low speed pump operation. A delay of three timer interrupts is interposed between the two speeds to prevent the possibility of on/off switching on cycle boundaries causing both outputs being on simultaneously.

[0153] Low Speed on Requests—the low speed pump requests or heater and heater cooling, as well as the filter interval are handled in this section. If a heater request is on, then a low speed pump request is posted. If the heater cool-down interval is active, a pump request is posted. If the current time is within the filter interval, a pump on request is posted. Control then passes to the control error handler (CTLERR).

[0154] The Module CTLACT—Routine CTLACT routine performs the following tasks:

[0155] Maintenance/Error Handling—if the system is in maintenance mode, the light, turbo and jet outputs are shut off. If the system has detected a serious system error (error 1 . . . 8), the turbo and jet outputs are shut off. In either case, the heater is shut down.

[0156] Pump Actuation—if any pump requests are posted and no shutdowns are requested, the pump is turned on.

[0157] Heater Actuation—if any heater requests are posted and no shutdowns are requested, the heater is turned on. Control then passes to the control LED handler.

[0158] The Module CTLERR-Routine CTLERR—routine posts two errors and two warnings. The errors it checks for are frozen water and mismatch in temperature readings (flow error). The warnings it checks for are the water being too hot for safe usage and the pH reading out of safe limits.

[0159] The Module CTLKEY-Routine CTLKEY—routine handles directly output keyboard inputs. In particular, it controls the light, jet and turbo. If the system is maintenance mode, no keys are processed. If the system is in an error state only the light key is processed. The controls are complemented each time the corresponding key is pressed.

[0160] The Module CTLLEDS-Routine CTLLEDS—if the module CTLLEDS-routine CTLLEDS operates when the system is in maintenance mode, and the LED drive is disabled, the light, turbo and jet LEDS are driven solely on the output states. The heater LED is driven steadily if the heater is on and flashed if the heater is off and has a request posted. The filter, set ready, scheduled heat and temperature LEDS are flashed if the corresponding function is posting a request and if the operator is not in a state used to set the function. If the operator is setting the function, the LED is already on and is not flashed.

[0161] The Module Delay-Routine Delay routine provides a software waitloop style of delay routine used mainly during powerup.

[0162] The Module DELTIME-Routines ADELTIME DELTIME routines are used to determine the interval between the current time and the specified time. DELTIME determines the time that has elapsed since the specified time while ADELTIME determines the time that remains until the specified time arrives.

[0163] The Display module contains routines that convert values into displayable messages and a routine that actually writes the messages to the display. Many of the routines have two entry points, DSPxxx and BFRxxx. The DSP version uses the standard buffer while the BFR version uses a user-specified buffer. The DSP version only will be described to avoid repetitive descriptions of the BFR versions.

[0164] The DSPULZ routine is called to remove leading zeros fog numeric messages.

[0165] The DSPBCD routine is called to convert from a BCD value to a display image.

[0166] The DSPOUT routine sends the message image to the display.

[0167] The DSPTIM routine converts a time value into a message.

[0168] The DSPTMP routine converts a temperature value into a message.

[0169] The DSPERR routine converts an error number into an error message.

[0170] The DSPPH routine converts a pH value into a message image.

[0171] The EXTRAM module contains routines to support the NOVRAM image of the system configuration.

[0172] The NVSUM routine is used to calculate the checksum value. It is used by the other routines to handle the checksummed configuration record.

[0173] The NVUPDT routine is called whenever a change is made to the configuration. It updates the checksum value. Powerfail interrupts are masked until the new checksum has been completed.

[0174] The ERTEST routine is called at powerup time to verify the system configuration. If the image is corrupted, it is reset to reasonable fallback values.

[0175] The Filter module contains routines that allow the user to set the filter maintenance interval. It has already been described in the operator settings sections.

[0176] The Flash module contains routines that support a consistent 2 hertz flash of LEDS, display, etc.

[0177] The Flashdrive routine is called to drive the timebase for the flasher. It is called once per timer interrupt synch by the main program.

[0178] The Flash routine returns a on/off flag to allow callers to determine if hey should be setting or clearing their outputs to flash.

[0179] The Float module contains several routines that provide operations on scaled integer values.

[0180] The FPADD routine adds two scaled integer values.

[0181] The FPMULT routine multiplies two scaled integer values.

[0182] The FPRND routine rounds a floating point number to the nearest integer value.

[0183] The Idle module contains routines that handle keyboard inputs and drive the display while the operator is not programming any of the system's features. The display is stepped through the current time, temperature, pH value (if installed) and errors (if any are present).

[0184] The KBIDLE routine handles keyboard inputs. If either of the arrow keys are pressed, the resettable errors are cleared. This is an operator acknowledgement of current alarms.

[0185] The GO SHOTOD routine is called as an entry state handler for the idle mode. It sets up to display the time and switches to the time of day state.

[0186] The SHOTOD routine is called to display the current time of day. The refresh flag is ignored. When the timer expires, the state is switched to show temperature.

[0187] The SHOTEMP routine is called to display the current spa temperature. The refresh flag is used to avoid flickering values when the current input is straddling values. When the timer expires, the show pH state is invoked.

[0188] The SHOPH routine is called to display the pH value. If no pH probe is installed, control is passed to the error displayer. Like the temperature display, the refresh flag is used to avoid flickering displays. When the timer expires, the error display state is called.

[0189] The ERRIDLE routine is called to display the errors. If no errors remain, the display time state is entered. If another error exists to be displayed, the value is displayed and the timer is restarted.

[0190] The Keyboard module contains routines that support the keyboard inputs. Keyboard inputs are signaled when the key is pressed. Key inputs are represented by an array of bits that are set when a positive transition has been detected. Three keys (up, down and maintenance) provide bits that correspond to the release of the keys. The up and down keys provide or an autorepeat that starts after a half a second and repeat at a frequency of approximately three hertz. Key transitions in both directions (on and off) are debounced.

[0191] The KBINT routine is called to initialize the keyboard image. It sets up the image such that keys that are dressed while the system powers up are ignored. Thus, a jammed key will not activate its corresponding function when the system started.

[0192] The KBSCAN routine is called periodically by the timer interrupt handler to scan the keyboard inputs and update the keyboard input image. Transitions are accumulated until they are cleared by a separate routine. Rollover is handled as additive keys. Simultaneous keys are allowed and are handled by the individual state handlers individually as prioritized keyboard inputs. This routine provides all debouncing and autorepeat functions.

[0193] The KBGET routine is called by the main program to poll or keyboard inputs. Only transitions are reported. Any key inputs are cleared and reported to the caller.

[0194] The KBAUTO routine is called to see if either of the arrow keys are being held down to generate autorepeat inputs. The result of this function is used to determine if the screen should be flashed. If repeat keys are active, flashing is inhibited.

[0195] The Module Learn-Routine Learn routine is called as part of the control manager. If the heater is heating, the temperature value is monitored. If the temperature raises through two successive degree transitions, the time that elapsed between those two events is examined. If the time is less than one minute or two hours elapse before the event, a rate of change alarm is posted. Otherwise, the heating rate is stored for use in the spa ready function.

[0196] The LEDS module contains routines that support the drive of the LEDs mounted inside the keypad.

[0197] The LEDS routine is called to define the output state. All LEDs are redefined by this routine. They are lit or extinguished depending on the state of a corresponding bit.

[0198] The LEDCLR routine is called to turn LEDs off. LEDs that have their corresponding bit set are turned off. Those whose bits are 0 are not affected.

[0199] The LEDSET routine is called to turn LEDs on. LEDs that have their corresponding bit set are turned on. Those whose bits are 0 are not affected.

[0200] The MAINT module controlling the maintenance mode has previously been described. It is implemented as two routines KBMAINT and DSPMAINT to handle keyboard inputs and display output respectively. While the main module views maintenance mode as one state, the maintenance mode is actually implemented as a set of substates in a manner identical to the state scheme used in the main module.

[0201] The nodule MYREGS-Routine MYREGS routine is called to determine the address of the current context's register set. The address of RO is returned in the accumulator. This routine is used when the registers are going to be used as general memory locations for subroutine parameters.

[0202] The NOVRAM module contains routines which handle the special requirements of the NOVRAM.

[0203] The NOVREAD routine is called to restore the nonvolatile image of the NOVRAM. It is called at powerup. It begins the restore function and handles the proper delay interval to give the NOVRAM to complete the refresh.

[0204] The NOVWRITE routine is called by the powerfail interrupt handler to signal the storage of the system configuration image to the nonvolatile image of the NOVRAM. It guarantees that the cycle is completed and returns to the powerfail handler.

[0205] The Module POWFAIL-Routine POWREFAIL routine is the powerfail interrupt handler and has previously been described.

[0206] The Revision module provides for the display of the software revision and/or version. It will display different values for variants of the system software to distinguish between them. Once the system has been completed, it will be sealed, so this will provide a surefire way of verifying the software contents.

[0207] The KBREV routine handles keyboard inputs while the revision is being displayed. It allows the user to step forward past this function since this function does nothing other than display the revision value.

[0208] The DSPREV routine is called to display the revision. The revision message is a constant message.

[0209] The Module ROMTEST-Routine ROMTEST routine is called at powerup to check the program ROM. It executes a simple data line test an reports failure if any errors are detected.

[0210] The Module RTC routine contains routines that support the real time clock device.

[0211] The RTCINIT routine is called at powerup to initialize the RTC and to verify that the time value makes sense. If it does, it is assumed to be correct. Otherwise, it is assumed that the time value was lost and the time is reset to twelve o-clock midnight.

[0212] The RTCPOL routine is called by the timer interrupt to poll the RTC for updates. If any changes have occurred, the new time is stored in RAM for use elsewhere in the system and a signal is returned that it is time to handle the one second update. If any changes have been posted, the new value is written.

[0213] The GETTOD routine is called by the system at large to fetch the current time of day.

[0214] The PUTTOD routine is called by the system at large to post a new time of day. On the next poll with a second update, the new value will be written to the RTC by the routine RTCPOL above.

[0215] The SCHEAT module contains the routines that allow the user to configure the scheduled heating function. This allows the user to redefine the heating hysteresis when the spa is unattended. The minimal hysteris value allowed is five degrees. The behavior of these routines has already been described.

[0216] The SETREADY module contains routines that allow the user to configure the set spa ready function. The behavior of these routines has previously been described.

[0217] The SHOWMEM module allows the user to display the contents of both classes of RAM. It is available only in maintenance mode.

[0218] The KBCPU routine handles keyboard inputs and allows the user to select the display of CPU RAM contents or continue to the next operation.

[0219] The DSPCPU routine displays the message “CPU” to indicate what operation can be selected.

[0220] The KBCSH routine handles keyboard input while displaying CPU RAM. It allows the user to raise or lower the current location or exit this function.

[0221] The DSPCSH routine displays the current CPU RAM address as well as the contents.

[0222] The KBNRAM, DSPNRAM, KBNRSH, DSPNRSH routines are identical to the CPU RAY routines above except that they operate on the NOVRAM contents.

[0223] The Module Start-Routine Reset routine handles the powerup reset. Its function has previously been described.

[0224] The TEMPSET module allows the user to set the desired spa temperature setpoint. This setpoint may be overridden by the scheduled heating function if it is enabled and the spa becomes unattended. The operation of this function has previously been described.

[0225] The TICK module contains routines that support slow realtime timers (in the order of seconds).

[0226] The TICK routine is called when the RTC has updated its second. It updates several operating timers as well as the runtime timers used to measure usage intervals for maintenance purposes.

[0227] The GETTMR routine is called to get the current value for an operating countdown timer.

[0228] The PUTTMR routine is called to reset the current value for an operating countdown timer.

[0229] The Module TIMEBIN-Routine TIMEBIN routine is called to convert from BCD hours/minutes to a binary value in minutes.

[0230] The Module Timer-Routine Timer is the timer interrupt handler. Its behavior has previously been described.

[0231] The TIMESET module contains routines that allow the user to set the current time of day. Their function has already been described.

[0232] The Module UNMIL-Routine UNMIL routine converts from military twenty-four hour format (used internally) to twelve hour an/pm format (preferred by most users).

[0233] The VECTORS module contains vectors that provide for the transfer among the two pairs of program segments. The thirteenth address line (A12) is manipulated as an output line in paired vector handlers to handoff control of the processor from one pair of the program segments to the other. The reset and interrupt vectors are also represented twice in this module to provide for interrupt handling from either pair of segments. This segment organization explains the discrepancies in how a particular subroutine is called from different modules. The difference is usually the act that the two callers reside in different segments.

[0234] It will be understood that these routines describe one embodiment of the system and can be modified without departing from the scope of the inventive concepts herein taught.

[0235]FIG. 5 shows one possible configuration of the keyboard 48 for the spa control panel 12. The overlay on the spa control panel 12 contains lights and a series of push button switches which can be depressed to switch on the appropriate functions. Preferably, an audible tone alerts the user that the computer 10 has received the signal sent by depressing the key. The jet button 49 operates the high speed pump 24 for the jet action in the spa. After the jet button 49 is depressed, the system will shut off the pump 24 if there is no flow in the system after five minutes of operation. The user is notified of the malfunction by an error message shown on the display. In a preferred embodiment, the low speed pump automatically is operated when the heater is activated. By pressing the jet button 49, the high speed overrides the low speed pump in pump 49. The heater 26 is still operable but the heating efficiency decreases because the water is moving faster over the heating element (in 220 v, in 110 v high speed pump disables heater). Interlocks link the pump 24 to the heater 26 so that the pump 24 runs fifteen seconds before the heater 26 is turned on and runs sixty seconds after the heater 26 is turned off. This ensures fluid flow during operation of the heater 26 so that hot spots in the system are not allowed to accumulate.

[0236] The air button 51 operates the blower motor (not shown) for the bubbling action in the spa (same interlock as jet/heater). The light button 53 operates any lights installed in the spa. The up arrow button 55 and down arrow button 63 are used conjunction with the set clock 57, set temperature 59, set ready 50, scheduled heating, and filter 61 buttons. The purpose of the up arrow button 55 is to increment data that is presented on the display 46. The down arrow button 63 is used in conjunction with these same buttons to decrement data that is presented on the display. The set clock button 57 is used to set the current time to day and is activated by pushing the set clock button 57. The desired time can then be set by activating the up arrow button 55 or the down arrow button 63 The set temperature button 65 can be used to control the temperature value for the thermostat in the heater 26. To set the temperature, the set temperature button 65 is depressed and the current setting for the thermostat will be shown on the display. The up arrow button 55 or the down arrow button 63 can be used to increase or decrease the temperature setting as desired. When the desired value is shown on the display 46, the set temperature button 65 is depressed and the system will revert to the normal scroll in display. The ranges on the temperature setting may range from 40 to 104 degrees Fahrenheit.

[0237] Referring to FIG. 6, when the system is powered up, the system is reset 100 by system initialization 102 which enables certain events and parameters and then calls the main program 100. Certain interrupts such as the timer interrupt 106 and the power fail interrupt 108 are enabled to detect future interrupts which can then be polled 100 or effect a system shutdown 112. The powerup reset 100 also generally clears all RAM 32, turns off control outputs for devices 24, 26, 28, 30, initializes the real time clock 34 reading and the keyboard scanner, tests the NOVRAM 32 image or validity, and tests EPROM memory 44 (See FIG. 7).

[0238] On powerup sequence, the AC line input is read and the system electronics make a determination on whether the power is 110 v or 220 v. This status is read trough a digital input by microcomputer 10 and an associated lag is set in RAM indicating which power supply is connected to the controller. On 110 v, a following constraints are imposed by the software:

[0239] Heater and low speed pump will be turned off if either the speed pump (jets) or the blower is turned on.

[0240] The heater LED will flash during this time indicating it is trying to heat but has been overridden.

[0241] On 220 v systems, no constraints are applied. The operation of this function is illustrated in FIG. 8.

[0242] The set ready button is used to preset the time and temperature that is desired by the user.

[0243] The microcomputer 10 calculates the proper time to initiate heating based on the present initial temperature of the water, and the stored data on the rate of heating for the particular spa. Each time that the spa is heated, the microcomputer 10 monitors the rate of change in the water temperature and stores this information in the internal memory. This data is then used to calculate the time necessary to heat the spa water from the initial temperature to the selected temperature.

[0244] To operate the set ready, or spa ready mode, the set ready button 50 is depressed and the set ready light 50 and the hours light digits on display 46 are illuminated. The hours are set by using the up button 55 and down button 63 arrows. When the hours are correct, the set ready button 50 is depressed and the minutes digits will flash. The minutes data are set by using the up button 55 and down button 63 arrows. When the minutes data is correct, the set ready button 50 is depressed and the current thermostat setting is displayed. The up button 55 or down button 53 arrow is pressed to select the proper temperature. The set ready button 50 is then depressed again and “on” or “off” will flash on the display screen 46. This indicates whether the feature is enabled or not. The set ready button 50 is again depressed and the data is entered. When it is time to begin the heating cycle, the system program LED on display 46 will flash to indicate that the temperature is active.

[0245] When the spa is heated to the proper temperature, the programmed thermostat setting becomes the current thermostat setting and the system will continue normal operation.

[0246] If enough time is not allocated for the spa to reach the desired temperature, and time runs out before the heating process is normally completed, the programmed thermostat setting will become the current thermostat setting and the system will continue normal operation.

[0247] The filtering button 67 allows the user to select the time or circulating the water in the spa for normal maintenance. To operate, the filter button 67 is depressed and the hours digits and the filter light will be eliminated. The up button 55 or down button 63 is operated to select the hour, and the filter button 67 is depressed to set the new running time. The data is loaded into memory, the light next to filter button 67 will turn off and the display 46 will return to the normal scroll in operation. When the filter functions are active, the LED will flash.

[0248] The use of the system is checked by determining whether any operator keys have been actuated within 30 minutes, or other selected interval, of the initial start time. If not, the high speed jet and turbo controls are turned off to conserve energy.

[0249] The heating light 69 is illuminated when the heating element of heater 26 is being activated. If the heating element is activated and the temperature of the water is not increasing, then an error message will be displayed. The LED will flash when the heater 26 is in a warm-up or cool-down cycle.

[0250] The system may be diagnosed by operating a switch in the system innerconnection panel 14 to place the keyboard 54 in display in the diagnostics mode. By pressing the jet button 49, the total number of hours of operation on the pump 24 will be displayed. Pressing the air button 51 will show the total hours of operation on the blower motor. Pressing the set temp button 59 will display the total hours of operation on the heater 26 and will eliminate the set temp light. Pressing the set clock button 57 will display the total hours the system exceeded the desired temperature, designated as greater than 104 degrees Fahrenheit in the preferred embodiment. The light associated with the set clock button 57 will be eliminated after any other button is pressed. Pressing the up arrow button 55 or the down arrow button 63 will eliminate other modes and turn on all lights on the panel 54 an will turn on all segments of the display 46 along with the colon. The normal operation of the system is disabled when the maintenance switch is on. For example, the lights, turbo and jet outputs, and heater are shut down when the system is in maintenance mode.

[0251] The system may display error codes which show potential problems within the system. Typical error codes which may be displayed might include information showing that the heater 26 was not heating, the pump 24 was not operating, there was insufficient time to heat the spa to the desired temperature, there was no water flow in the system, or there was failure in the microcomputer 10. Sensors (not shown) can be located at select locations in the system. From these sensors, the system can check for frozen water in the system and can determine whether the pH reading of the system is outside of a desired range. The system provides two functions regarding freezing to the water in the system. First, if either temperature sensor reads a temperature of thirty-four degrees or lower, the spa is considered frozen and all operations are disabled. The heater, the pumps and the blower are disabled to avoid damage to the mechanisms. Second, if the heater temperature crops below thirty-eight degrees, an impending freeze is signaled. The reaction to this condition is to run the low speed pump for five minutes. If the condition has not improved, the heater is started. Every five minutes thereafter, the temperature is rechecked. If the condition clears (the temperature rises above forty degrees), operations return to normal. This feature operates in addition to and in parallel with other operating modes.

[0252] This feature addresses the common problem of a spa being cooled by exterior cooler temperatures. The pipes and heater tend to cool faster since there is a small mass of water being cooled. If the pipes are allowed to freeze, they may be damaged or the moving mechanisms such as the pump or blower may be damaged when they are activated.

[0253] In another embodiment of the invention, the system can monitor the temperature of the water at different locations in the system to determine whether there is blockage in the system. The spa system accomplishes this by monitoring the temperatures detected by sensors located at selected locations in the spa control system. In one embodiment of the invention, a first sensor (not shown), which can be a solid state sensor, is located upstream of the heating element at a selected location and a second sensor (not shown) is located downstream of the heating element. As water flows over the heating element of heater 26, the sensors detect the temperature of the water at the selected locations. The microcomputer 10 processes the signals generated by the sensors and calculates the difference in temperature between the values detected by the sensors. The microprocessor selectively activates and deactivates the heating element of heater 26 to control the rate of heating. If the difference exceeds a selected amount, a warning on digital display 46, or other warning such as an audible sound, can be generated to warn the user of a malfunction in the spa. This function of the invention is shown in FIG. 7.

[0254] In one embodiment of ,are system, two temperature probes are monitored constantly for temperature differences whenever the pump is in operation. When the pump is started, five minutes are allowed for the two readings to get within six degrees Fahrenheit of one another. If the probes fail to match after this period, all spa operations cease and an error message is displayed to he user. If the heater temperature is more than six degrees higher than the spa temperature, the heater is not turned on. If the heater temperature is more than six degrees colder than the spa temperature and the heater function is signaled to be on by other portions of the control program, the heater is turned on even though the temperatures do not match. If at any time after the first five minutes the difference between the two temperature readings exceeds six degrees, all spa operations are disabled and an error message is displayed to the user.

[0255] As previously noted, this embodiment determines whether flow is present in the spa plumbing. If a blockage exists, it will result in a temperature difference which will cause the system to halt operations. The initial five minute period allows for the equalization of temperature differences that naturally occur when no water flow is present. Typically, a finite period of time is required or plumbing fixtures to warm and cool and for the temperature sensor to react to its surroundings.

[0256] In addition, the microcomputer 10 can calculate the rate of heating detected by either sensor to determine whether there may be fluid blockage in the spa system. This calculation can be performed by dividing the change in temperature by the change in time to compute the rate of heating. For example, if there is a fluid blockage in the system, the spa water surrounding the heating element of heater 26 may rapidly overheat to create a “hot spot” in the spa system. If the temperature of the water does not increase, here may be a malfunction in the heating element. If any error is detected which signifies that the spa system is not properly working, the microcomputer 10 can deactivate the heaving element to prevent overheating of the components of the spa system or can signal an error code on the display. The rate of heating can also be monitored to ensure that scalding water is not unexpectedly circulated in contact with the spa user. A cumulative average rate of heating for the spa system can be calculated from the heating rates which are calculated each time that the spa temperature is increased. This function of the invention is shown in FIG. 9.

[0257] In one embodiment ox the invention, the temperature of the water can be maintained within a selected temperature range or hysteresis when the spa is unattended, and the system can be programmed to heat the water temperature to a selected amount at a desired time. This function, referred to as the scheduler heating function, is begun by setting the start time and the high and low temperature limits. Next, the function is enabled. For example, the operator might select a lower temperature range, while the spa is unattended, to conserve energy. A lower temperature range would also educe the number of times that the spa system would cycle on and off to maintain the desired temperature, if the lower water temperature is closer to the ambient temperature. Conversely, the operator can select a higher temperature range, closer to the desired temperature of the spa water, to minimize the time required to heat the spa water to the selected operating temperature. The ability to control the temperature of the water while the spa is unattended also yields other useful benefits. For example, the spa system can be programmed to heat the water to a desired temperature at a time of day when electrical power rates are minimal. The heat loss of the spa system during periods when the spa is unattended, calculated from the time that the spa water is heated to the desired temperature, can be calculated to maximize the operating efficiency of the entire spa system.

[0258] In another embodiment of the invention, the heating rate of the water can be monitored to calculate the estimated time necessary to raise the water temperature to a desired level, and to detect certain failures in the spa system. For example, a sudden increase in the water temperature at a specific point in the spa system may signal that here is a loss of water circulation. If a sensor detects a heating rate which exceeds a selected rate, a warning message may be displayed, or the heating element of heater 26 or the entire spa system may be deactivated to prevent deleterious heating of the spa components. As previously set forth, the rate of heating, together with the actual temperature reading and volume to water in the spa system, can be used to calculate the time required to heat the spa water to a desired temperature. This information can be stored in microcomputer to assist in predicting the time necessary to heat the spa water to the desired temperature, beginning with the initial temperature of the water when the sa is unattended This function is shown in FIG. 10.

[0259] To further illustrate the spa control system and certain of its functions, FIG. 11 shows a flowchart for one embodiment of the system which illustrates Power-up/Reset function, which describes how the system is initiated and can be modified by one operator; FIG. 12 shows a flowchart for the Timer Interrupt function, which interrupts a programmed command; and FIG. 13 shows a flowchart for the Powerfail function, which shuts down certain components of the system upon a certain event. As with other embodiments illustrated herein, the flowcharts shown in FIGS. 11-13 represent differing embodiments of the present invention and may be varied without departing from the scope of the invention.

[0260] The embodiments shown above are merely illustrative of the present invention. Many other examples of the embodiments set forth above and other modifications to the spa control system may be made without departing from the scope of this invention. It is understood that the details shown herein are to be interpreted as illustrative and not in a limiting sense. 

What is claimed is:
 1. A spa control system for monitoring the temperature of water in the system, comprising: a heating element for heating the water; a first sensor for detecting the temperature of the water at a selected location; a second sensor for detecting the temperature of the water at selected location; and a microcomputer for processing signals generated by said sensors, wherein said microcomputer is capable of selectively activating and deactivating said heating element.
 2. A spa control system as recited in claim 1 , wherein said microcomputer is capable of calculating the difference between the temperatures detected by said sensors.
 3. A spa control system as recited in claim 2 , wherein said microcomputer is capable of deactivating said heating element when the temperature difference exceeds a selected amount.
 4. A spa control system as recited in claim 2 , further comprising a display which is capable of being activated by said microcomputer when said temperature difference exceeds a selected amount.
 5. A spa control system as recited in claim 2 , further comprising a display activated by said microcomputer when said temperature difference is less than a selected amount.
 6. A spa control system as recited in claim 1 , wherein the water flows past said heating element, said first sensor detects the temperature of the water upstream of said heating element, and said second sensor detects the temperature of said water downstream of said heating element as the water flows past said heating element.
 7. A spa control system as recited in claim 1 , wherein said microcomputer is capable of sensing the signals generated by said first and second sensors and is capable of calculating the rate of increase in the temperature of the water.
 8. A spa control system or determining the time necessary to heat the water in the system from an initial temperature to a selected temperature, comprising: a heating element for heating water; a sensor or detecting the temperature of the water; and a microcomputer or processing signals generated by said sensor and or selectively activating and deactivating said heating element, wherein said microcomputer is capable of assessing the initial temperature of the water, of activating said heating element to increase the temperature to the water, of deactivating said heating element after the water has been heated to a selected temperature, and of assessing the time necessary to raise the temperature of the water from the initial temperature to the desired temperature.
 9. A spa control system as recited in claim 8 , wherein said microcomputer is capable of calculating the rate of heating of the water.
 10. A spa control system as recited in claim 9 , wherein the rate of heating is stored by the microcomputer.
 11. A spa control system as recited in claim 9 , wherein said microcomputer is capable of calculating a cumulative, average rate of heating by averaging the rate of heating, determined each time that the spa water is heated, with the rate of heating previously calculated for the spa system.
 12. A spa control system as recited in claim 10 , wherein said microcomputer is capable of determining the temperature difference between the selected temperature and the initial temperature, of assessing the rate of heating, and of calculating the amount of time necessary to heat the water from the initial temperature to the desired temperature.
 13. A sea control system as recited in claim 12 , wherein said microcomputer is capable of assessing the initial temperature of the water, the rate of heating, the desired time at which the water temperature will equal the selected temperature, and wherein said microcomputer is capable of determining the start time necessary for activating said heating element so that said water is heated to the selected temperature at the desired time.
 14. A spa control system for heating the water in the system from an initial temperature to a selected temperature at a desired time, comprising: a heating element for heating the water; a sensor for detecting the temperature of the water; and a microcomputer connected with said heating element and said sensor which is capable of assessing the initial temperature of the water, the average rate of heating, and is capable of determining the start time necessary for activating said heating element so that said water is heated to the selected temperature at the desired time.
 15. A spa control system as recited in claim 14 , wherein said microcomputer is capable of activating said heating element at said start time.
 16. A spa control system as recited in claim 15 , wherein said microcomputer is capable to deactivating said heating element when the temperature of the water equals the selected temperature.
 17. A sa control system as recited in claim 16 , further comprising a display which is capable of being activated by said microcomputer when the temperature of the water equals the selected temperature.
 18. A spa control system which contains water in the system and which is powered by a power source, comprising: a heating element for heating the water; a low speed pump for circulating the water in the spa control system; and a microcomputer for determining the voltage of the power source, wherein said microcomputer is capable of setting a flag in the memory of said microcomputer to indicate the voltage of the power source.
 19. A spa control system as recited in claim 18 , wherein a flag is set in the memory of the microcomputer if the voltage of the power source is 110 volts.
 20. A spa control system as recited in claim 19 , further comprising a high speed pump.
 21. A spa control system, as recited in claim 20 , wherein said heating element and said low speed pump are deactived when said high speed pump is activated.
 22. A spa control system as recited in claim 19 , further comprising a blower.
 23. A spa control system as recited in claim 22 , wherein said heating element and said low speed pump are deactivated when said blower is activated.
 24. A spa control system as recited in claim 21 , further comprising a display which is capable of indicating when said heating element is deactivated.
 25. A spa control system for monitoring the temperature of water in the system, comprising: a heating element for heating the water; a first sensor adjacent to said heating element for detecting the temperature of the water at said heating element; a second sensor for detecting the temperature of the water at a selected location; a pump which is capable of being activated to circulate the water in the system; and a microcomputer for processing signals generated by said sensors, wherein said microcomputer is capable of calculating the difference between the temperatures detected by said first sensor and said second sensor at a selected time after said pump is activated.
 26. A spa control system as recited in claim 25 , wherein said microcomputer is capable of selectively activating and deactivating said heating element if the temperature difference, calculated five minutes after said pump is turned on, exceeds six degrees Fahrenheit.
 27. A spa control system as recited in claim 26 , wherein said microcomputer is capable of deactivating said heating element if the temperature of said first sensor exceeds the temperature to said second sensor by more than six degrees Fahrenheit.
 28. A spa control system as recited in claim 26 , wherein said microcomputer is capable of activating said heating element if the temperature of said first sensor is more than six degrees less than the temperature of said second sensor.
 29. A spa control system for monitoring the temperature of water in the system, comprising: a heating element for heating the water; a pump for circulating the water in the system; a sensor for detecting the temperature of the water at a selected location; and a microcomputer for processing signals generated by said sensor, wherein said microcomputer is capable of deactivating said heating element and said pump when said sensor detects a water temperature equal to or less than thirty-four degrees Fahrenheit.
 30. A spa control system as recited in claim 29 , further comprising a blower which is capable of being deactivated by said microcomputer when said sensor detects a water temperature equal to or less than thirty-four degrees Fahrenheit.
 31. A spa control system for monitoring the temperature of water in the system, comprising: a heating element for heating the water; a pump for circulating the water in the system; a sensor for detecting the temperature of the water at a selected location; and a microcomputer for processing signals generated by said sensor, wherein said microcomputer is capable of activating said pump for a selected time when said sensor detects a water temperature equal to or less than thirty-eight degrees Fahrenheit.
 32. A spa control system as recited in claim 31 , wherein said microcomputer is capable of activating said pump for a five minute period when said sensor detects a water temperature equal to or less than thirty-eight degrees Fahrenheit.
 33. A spa control system as recited in claim 32 , wherein said microcomputer is capable of activating said heating element temperature of the water, at the end of said five minute is equal to or less than thirty-eight degrees Fahrenheit.
 34. A spa control system as recited in claim 33 , wherein said microcomputer is capable of monitoring the temperature of the water at five minute intervals after said heating element is activated, and wherein said microcomputer is further capable of deactivating said heating element when the temperature of the water exceeds forty degrees Fahrenheit. 